# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: handler.py
# Time: 16:39

import win32gui
import win32con

dialog = win32gui.FindWindow("004F115A",r"文件上传")
ComboBoxEx32 = win32gui.FindWindowEx(dialog,0,"ComboBoxEx32",None)
ComboBox = win32gui.FindWindowEx(ComboBoxEx32, 0, 'ComboBox', None)
Edit = win32gui.FindWindowEx(ComboBox, 0, 'Edit', None)
button = win32gui.FindWindowEx(dialog, 0, 'Button', None)
win32gui.SendMessage(Edit, win32con.WM_SETTEXT, None, r'F:\Stript\Py\ui_automater_selenium_test\data\newtheme\主题图片.png')
win32gui.SendMessage(dialog, win32con.WM_COMMAND, 1, button)
